package c2.cross.business.base;

import c2.advanced.business.AdvancedBody;
import c2.advanced.business.base.AdvancedModule;
import c2.advanced.business.base.KvData;
import c2.advanced.business.help.AdvancedHelpFacade;
import c2.advanced.share.*;
import c2.cross.business.CrossBody;
import c2.cross.business.admin.CrossAdminFacade;
import c2.cross.share.*;
import lombok.extern.slf4j.Slf4j;

/**
 * 跨服模块
 */
@Slf4j
public abstract class CrossModule<S extends KvData> extends AdvancedModule<S> {

    protected CrossBody context;

    @Override
    protected AdvancedBody context() {
        return this.context;
    }

    protected DbFacade4Cross db() {
        return this.context.db;
    }

    @Override
    protected DbFacade _db() {
        return db();
    }

    public CrossModule(CrossBody context) {
        this.context = context;
    }

    public CrossAdminFacade admin() {
        return context.admin;
    }

    public AdvancedHelpFacade help() {
        return context.help;
    }
}
